#include <stdio.h>
#include "u24_test.h"
#include "util.h"

void u24_test_print(void)
{
	u24 i24;

	i24[0] = 0;
	i24[1] = 1;
	i24[2] = 2;
	//int i = 0;
	printf("i24 = %02x%02x%02x\r\n", i24[0], i24[1], i24[2]);
}

void u24_test_assign0(u32 value)
{
	u24 i24_dst;

	memcpy(&i24_dst, &value, sizeof(u24));
	printf("i24 = %02x%02x%02x\r\n", i24_dst[0], i24_dst[1], i24_dst[2]);
}

void u24_test_assign1(void)
{
	u24 i24_src, i24_dst;

	i24_src[0] = 0;
	i24_src[1] = 1;
	i24_src[2] = 2;
	//int i = 0;
	
	memcpy(&i24_dst, &i24_src, sizeof(u24));
	printf("i24 = %02x%02x%02x\r\n", i24_dst[0], i24_dst[1], i24_dst[2]);
}

void u24_test_assign2(u32 value)
{
	u24 i24_dst;

	write_dram_24(&i24_dst, value);
	printf("i24 = %02x%02x%02x\r\n", i24_dst[0], i24_dst[1], i24_dst[2]);
}
